package com.xdtech.play.vo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.sql.Timestamp;

import com.xdtech.core.model.BaseItem;
import com.xdtech.core.orm.utils.BeanUtils;
import com.xdtech.play.model.PlayTradeRecord;

import com.xdtech.web.freemark.item.GridColumn;

/**
 * 
 * @author max.zheng
 * @create 2016-05-08 23:42:57
 * @since 1.0
 * @see
 */
public class PlayTradeRecordItem extends BaseItem implements Serializable{
	private static final long serialVersionUID = 1L;
	private Long id;
	@GridColumn(title="操作人",width=100)
	private String operator;
	@GridColumn(title="交易金额",width=100)
	private Integer account;
	@GridColumn(title="交易类型",width=100,dictionaryCode="TRADE_TYPE")
	private String tradeType;
	@GridColumn(title="支付方式",width=100,dictionaryCode="PAY_TYPE")
	private String payType;
	@GridColumn(title="交易时间",width=120)
	private String operateTime;
	@GridColumn(title="余额")
	private Integer accountBlance;
	
	private Long memberId;
	private String memberName;
	//操作时间从
	private String operateTimeForm;
	//操作时间到
	private String operateTimeEnd;
	
	public void setId(Long id) {
		this.id = id;
		addQuerys("id", id);
	}
	public Long getId() {
		return id;
	}
	
	public void setAccount(Integer account) {
		this.account = account;
		addQuerys("account", account);
	}
	public Integer getAccount() {
		return account;
	}
	
	public void setTradeType(String tradeType) {
		this.tradeType = tradeType;
		addQuerys("tradeType", tradeType);
	}
	public String getTradeType() {
		return tradeType;
	}
	
	public void setPayType(String payType) {
		this.payType = payType;
		addQuerys("payType", payType);
	}
	public String getPayType() {
		return payType;
	}
	
	
	
	public Long getMemberId() {
		return memberId;
	}
	public void setMemberId(Long memberId) {
		this.memberId = memberId;
		addQuerys("memberId", memberId);
	}
	public String getMemberName() {
		return memberName;
	}
	public void setMemberName(String memberName) {
		this.memberName = memberName;
		addQuerys("memberName", memberName);
	}
	
	public String getOperator()
	{
		return operator;
	}
	public void setOperator(String operator)
	{
		this.operator = operator;
		addQuerys("operator", operator);
	}
	
	
	public String getOperateTimeForm()
	{
		return operateTimeForm;
	}
	public void setOperateTimeForm(String operateTimeForm)
	{
		this.operateTimeForm = operateTimeForm;
		addQuerys("operateTimeForm", operateTimeForm);
	}
	public String getOperateTimeEnd()
	{
		return operateTimeEnd;
	}
	public void setOperateTimeEnd(String operateTimeEnd)
	{
		this.operateTimeEnd = operateTimeEnd;
		addQuerys("operateTimeEnd", operateTimeEnd);
	}
	
	public String getOperateTime()
	{
		return operateTime;
	}
	public void setOperateTime(String operateTime)
	{
		this.operateTime = operateTime;
	}
	public Integer getAccountBlance()
	{
		return accountBlance;
	}
	public void setAccountBlance(Integer accountBlance)
	{
		this.accountBlance = accountBlance;
		addQuerys("accountBlance", accountBlance);
	}
	/**
	 * 根据model构建vo
	 * 
	 * @author max
	 * @return
	 */
	public static PlayTradeRecordItem createItem(PlayTradeRecord playTradeRecord) {
		PlayTradeRecordItem playTradeRecordItem = null;
		if(playTradeRecord!=null) {
			playTradeRecordItem = new PlayTradeRecordItem();
			BeanUtils.copyProperties(playTradeRecordItem, playTradeRecord);
			//自定义属性设置填充
		}
		
		return playTradeRecordItem;
	}
	/**
	 * 根据model集合创建vo集合
	 * 
	 * @author max
	 * @return
	 */
	public static List<PlayTradeRecordItem> createItems(List<PlayTradeRecord> playTradeRecords) {
		List<PlayTradeRecordItem> playTradeRecordItems = new ArrayList<PlayTradeRecordItem>();
		for (PlayTradeRecord playTradeRecord : playTradeRecords) {
			playTradeRecordItems.add(createItem(playTradeRecord));
		}
		return playTradeRecordItems;
	}
}
